nethackfandomcom-20200214-history
Source:NetHack 3.2.0/objects.c
Below is the full text to objects.c from the source code of NetHack 3.2.0. To link to a particular line, write [[NetHack 3.2.0/objects.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)objects.c 3.2 96/03/28 */ 2. /* Copyright © Mike Threepoint, 1989. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef OBJECTS_PASS_2_ 6. /* first pass */ 7. struct monst { struct monst *dummy; }; /* lint: struct obj's union */ 8. #include "config.h" 9. #include "obj.h" 10. #include "objclass.h" 11. #include "prop.h" 12. 13. #else /* !OBJECTS_PASS_2_ */ 14. /* second pass */ 15. # ifdef TEXTCOLOR 16. #include "color.h" 17. # define COLOR_FIELD(X) X, 18. # else 19. # define COLOR_FIELD(X) /*empty*/ 20. # endif 21. #endif /* !OBJECTS_PASS_2_ */ 22. 23. /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */ 24. 25. /* 26. * Note: OBJ() and BITS() macros are used to avoid exceeding argument 27. * limits imposed by some compilers. The ctnr field of BITS currently 28. * does not map into struct objclass, and is ignored in the expansion. 29. * The 0 in the expansion corresponds to oc_pre_discovered, which is 30. * set at run-time during role-specific character initialization. 31. */ 32. 33. #ifndef OBJECTS_PASS_2_ 34. /* first pass -- object descriptive text */ 35. # define OBJ(name,desc) name,desc 36. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \ 37. {obj} 38. 39. NEARDATA struct objdescr obj_descr[] = { 40. #else 41. /* second pass -- object definitions */ 42. 43. # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \ 44. nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl /* SCO ODT 1.1 cpp fodder */ 45. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \ 46. {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \ 47. prob, wt, cost, sdam, ldam, oc1, oc2, nut} 48. 49. NEARDATA struct objclass objects[] = { 50. #endif 51. /* dummy object0 -- description arg *must* be NULL */ 52. OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,0,0), 0, 53. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 54. 55. /* weapons ... */ 56. #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \ 57. OBJECT( \ 58. OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \ 59. WEAPON_CLASS, prob, 0, \ 60. wt, cost, sdam, ldam, hitbon, 0, wt, color ) 61. #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,prop,color) \ 62. OBJECT( \ 63. OBJ(name,app), \ 64. BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,WEP_AMMO,metal), 0, \ 65. WEAPON_CLASS, prob, 0, \ 66. wt, cost, sdam, ldam, hitbon, prop, wt, color ) 67. #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,prop,color) \ 68. OBJECT( \ 69. OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,WEP_BOW,metal), 0, \ 70. WEAPON_CLASS, prob, 0, \ 71. wt, cost, 2, 2, hitbon, -(prop), wt, color ) 72. 73. /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18) 74. * the extra damage is added on in weapon.c, not here! */ 75. 76. #define P PIERCE 77. #define S SLASH 78. #define B WHACK 79. 80. /* missiles */ 81. PROJECTILE("arrow", (char *)0, 82. 1, 42, 1, 2, 6, 6, 0, IRON, WP_BOW, HI_METAL), 83. PROJECTILE("elven arrow", "runed arrow", 84. 0, 10, 1, 2, 7, 6, 0, IRON, WP_BOW, HI_METAL), 85. PROJECTILE("orcish arrow", "crude arrow", 86. 0, 11, 1, 2, 5, 6, 0, IRON, WP_BOW, CLR_BLACK), 87. PROJECTILE("silver arrow", (char *)0, 88. 1, 8, 1, 2, 6, 6, 0, SILVER, WP_BOW, HI_SILVER), 89. PROJECTILE("ya", "bamboo arrow", 90. 0, 5, 1, 4, 7, 7, 1, METAL, WP_BOW, HI_METAL), 91. PROJECTILE("crossbow bolt", (char *)0, 92. 1, 50, 1, 2, 4, 6, 0, IRON, WP_CROSSBOW, HI_METAL), 93. 94. WEAPON("dart", (char *)0, 95. 1, 1, 0, 60, 1, 2, 3, 2, 0, P, WEP_MISSILE, IRON, HI_METAL), 96. WEAPON("shuriken", "throwing star", 97. 0, 1, 0, 35, 1, 5, 8, 6, 2, P, WEP_MISSILE, IRON, HI_METAL), 98. WEAPON("boomerang", (char *)0, 99. 1, 1, 0, 15, 5, 20, 9, 9, 0, 0, WEP_MISSILE, WOOD, HI_WOOD), 100. 101. /* spears */ 102. WEAPON("spear", (char *)0, 103. 1, 1, 0, 50, 30, 3, 6, 8, 0, P, WEP_SPEAR, IRON, HI_METAL), 104. WEAPON("elven spear", "runed spear", 105. 0, 1, 0, 10, 30, 3, 7, 8, 0, P, WEP_SPEAR, IRON, HI_METAL), 106. WEAPON("orcish spear", "crude spear", 107. 0, 1, 0, 13, 30, 3, 5, 8, 0, P, WEP_SPEAR, IRON, CLR_BLACK), 108. WEAPON("dwarvish spear", "stout spear", 109. 0, 1, 0, 12, 35, 3, 8, 8, 0, P, WEP_SPEAR, IRON, HI_METAL), 110. WEAPON("javelin", "throwing spear", 111. 0, 1, 0, 10, 20, 3, 6, 6, 0, P, WEP_SPEAR, IRON, HI_METAL), 112. 113. WEAPON("trident", (char *)0, 114. 1, 0, 0, 8, 25, 5, 6, 4, 0, P, 0, IRON, HI_METAL), 115. /* +1 small, +2d4 large */ 116. 117. /* blades */ 118. WEAPON("dagger", (char *)0, 119. 1, 1, 0, 25, 10, 4, 4, 3, 2, P, WEP_BLADE, IRON, HI_METAL), 120. WEAPON("elven dagger", "runed dagger", 121. 0, 1, 0, 8, 10, 4, 5, 3, 2, P, WEP_BLADE, IRON, HI_METAL), 122. WEAPON("orcish dagger", "crude dagger", 123. 0, 1, 0, 10, 10, 4, 3, 3, 2, P, WEP_BLADE, IRON, CLR_BLACK), 124. WEAPON("athame", (char *)0, 125. 1, 1, 0, 0, 10, 4, 4, 3, 2, S, WEP_BLADE, IRON, HI_METAL), 126. WEAPON("scalpel", (char *)0, 127. 1, 1, 0, 0, 5, 4, 3, 3, 2, S, WEP_BLADE, IRON, HI_METAL), 128. WEAPON("knife", (char *)0, 129. 1, 1, 0, 20, 5, 4, 3, 2, 0, P|S, WEP_BLADE, IRON, HI_METAL), 130. WEAPON("stiletto", (char *)0, 131. 1, 1, 0, 5, 5, 4, 3, 2, 0, P|S, WEP_BLADE, IRON, HI_METAL), 132. WEAPON("worm tooth", (char *)0, 133. 1, 0, 0, 0, 20, 2, 2, 2, 0, 0, 0, 0, CLR_WHITE), 134. WEAPON("crysknife", (char *)0, 135. 1, 0, 0, 0, 20,100, 10, 10, 3, P, WEP_BLADE, MINERAL, CLR_WHITE), 136. 137. WEAPON("axe", (char *)0, 138. 1, 0, 0, 40, 60, 8, 6, 4, 0, S, WEP_BLADE, IRON, HI_METAL), 139. WEAPON("battle-axe", "double-headed axe", 140. 0, 0, 1, 10,120, 40, 8, 6, 0, S, WEP_BLADE, IRON, HI_METAL), 141. /* "double-bitted" ? */ 142. 143. /* swords */ 144. WEAPON("short sword", (char *)0, 145. 1, 0, 0, 8, 30, 10, 6, 8, 0, P, WEP_SWORD, IRON, HI_METAL), 146. WEAPON("elven short sword", "runed short sword", 147. 0, 0, 0, 2, 30, 10, 8, 8, 0, P, WEP_SWORD, IRON, HI_METAL), 148. WEAPON("orcish short sword", "crude short sword", 149. 0, 0, 0, 3, 30, 10, 5, 8, 0, P, WEP_SWORD, IRON, CLR_BLACK), 150. WEAPON("dwarvish short sword", "broad short sword", 151. 0, 0, 0, 2, 30, 10, 7, 8, 0, P, WEP_SWORD, IRON, HI_METAL), 152. WEAPON("scimitar", "curved sword", 153. 0, 0, 0, 15, 40, 15, 8, 8, 0, S, WEP_SWORD, IRON, HI_METAL), 154. WEAPON("silver saber", (char *)0, 155. 1, 0, 0, 6, 40, 75, 8, 8, 0, S, WEP_SWORD, SILVER, HI_SILVER), 156. WEAPON("broadsword", (char *)0, 157. 1, 0, 0, 8, 70, 10, 4, 6, 0, S, WEP_SWORD, IRON, HI_METAL), 158. /* +d4 small, +1 large */ 159. WEAPON("elven broadsword", "runed broadsword", 160. 0, 0, 0, 4, 70, 10, 6, 6, 0, S, WEP_SWORD, IRON, HI_METAL), 161. /* +d4 small, +1 large */ 162. WEAPON("long sword", (char *)0, 163. 1, 0, 0, 50, 40, 15, 8, 12, 0, S, WEP_SWORD, IRON, HI_METAL), 164. WEAPON("two-handed sword", (char *)0, 165. 1, 0, 1, 22,150, 50, 12, 6, 0, S, WEP_SWORD, IRON, HI_METAL), 166. /* +2d6 large */ 167. WEAPON("katana", "samurai sword", 168. 0, 0, 0, 4, 40, 80, 10, 12, 1, S, WEP_SWORD, IRON, HI_METAL), 169. /* special swords set up for artifacts */ 170. WEAPON("tsurugi", "long samurai sword", 171. 0, 0, 1, 0, 60,500, 16, 8, 2, S, WEP_SWORD, METAL, HI_METAL), 172. /* +2d6 large */ 173. WEAPON("runesword", "runed broadsword", 174. 0, 0, 0, 0, 40,300, 4, 6, 0, S, WEP_SWORD, IRON, CLR_BLACK), 175. /* +d4 small, +1 large */ 176. /* +5d2 +d8 from level drain */ 177. 178. /* polearms */ 179. /* spear-type */ 180. WEAPON("partisan", "vulgar polearm", 181. 0, 0, 1, 10, 80, 10, 6, 6, 0, P, WEP_POLEARM, IRON, HI_METAL), 182. /* +1 large */ 183. WEAPON("ranseur", "hilted polearm", 184. 0, 0, 1, 10, 50, 6, 4, 4, 0, P, WEP_POLEARM, IRON, HI_METAL), 185. /* +d4 both */ 186. WEAPON("spetum", "forked polearm", 187. 0, 0, 1, 10, 50, 5, 6, 6, 0, P, WEP_POLEARM, IRON, HI_METAL), 188. /* +1 small, +d6 large */ 189. WEAPON("glaive", "single-edged polearm", 190. 0, 0, 1, 15, 75, 6, 6, 10, 0, S, WEP_POLEARM, IRON, HI_METAL), 191. WEAPON("lance", (char *)0, 192. 1, 0, 0, 8,180, 10, 6, 8, 0, P, WEP_POLEARM, IRON, HI_METAL), 193. /* axe-type */ 194. WEAPON("halberd", "angled poleaxe", 195. 0, 0, 1, 16,150, 10, 10, 6, 0, P|S, WEP_POLEARM, IRON, HI_METAL), 196. /* +1d6 large */ 197. WEAPON("bardiche", "long poleaxe", 198. 0, 0, 1, 8,120, 7, 4, 4, 0, S, WEP_POLEARM, IRON, HI_METAL), 199. /* +1d4 small, +2d4 large */ 200. WEAPON("voulge", "pole cleaver", 201. 0, 0, 1, 8,125, 5, 4, 4, 0, S, WEP_POLEARM, IRON, HI_METAL), 202. /* +d4 both */ 203. WEAPON("dwarvish mattock", "broad pick", 204. 0, 0, 1, 13,120, 50, 12, 8,-1, B, WEP_POLEARM, IRON, HI_METAL), 205. 206. /* curved/hooked */ 207. WEAPON("fauchard", "pole sickle", 208. 0, 0, 1, 11, 60, 5, 6, 8, 0, P|S, WEP_POLEARM, IRON, HI_METAL), 209. WEAPON("guisarme", "pruning hook", 210. 0, 0, 1, 11, 80, 5, 4, 8, 0, S, WEP_POLEARM, IRON, HI_METAL), 211. /* +1d4 small */ 212. WEAPON("bill-guisarme", "hooked polearm", 213. 0, 0, 1, 8,120, 7, 4, 10, 0, P|S, WEP_POLEARM, IRON, HI_METAL), 214. /* +1d4 small */ 215. /* other */ 216. WEAPON("lucern hammer", "pronged polearm", 217. 0, 0, 1, 10,150, 7, 4, 6, 0, B|P, WEP_POLEARM, IRON, HI_METAL), 218. /* +1d4 small */ 219. WEAPON("bec de corbin", "beaked polearm", 220. 0, 0, 1, 8,100, 8, 8, 6, 0, B|P, WEP_POLEARM, IRON, HI_METAL), 221. 222. /* bludgeons */ 223. WEAPON("mace", (char *)0, 224. 1, 0, 0, 40, 30, 5, 6, 6, 0, B, 0, IRON, HI_METAL), 225. /* +1 small */ 226. WEAPON("morning star", (char *)0, 227. 1, 0, 0, 12,120, 10, 4, 6, 0, B, 0, IRON, HI_METAL), 228. /* +d4 small, +1 large */ 229. WEAPON("war hammer", (char *)0, 230. 1, 0, 0, 15, 50, 5, 4, 4, 0, B, 0, IRON, HI_METAL), 231. /* +1 small */ 232. WEAPON("club", (char *)0, 233. 1, 0, 0, 12, 30, 3, 6, 3, 0, B, 0, WOOD, HI_WOOD), 234. #ifdef KOPS 235. WEAPON("rubber hose", (char *)0, 236. 1, 0, 0, 0, 20, 3, 4, 3, 0, B, 0, PLASTIC, CLR_BROWN), 237. #endif 238. WEAPON("quarterstaff", "staff", 239. 0, 0, 1, 11, 40, 5, 6, 6, 0, B, 0, WOOD, HI_WOOD), 240. /* two-piece */ 241. WEAPON("aklys", "thonged club", 242. 0, 0, 0, 8, 15, 4, 6, 3, 0, B, 0, IRON, HI_METAL), 243. WEAPON("flail", (char *)0, 244. 1, 0, 0, 40, 15, 4, 6, 4, 0, B, 0, IRON, HI_METAL), 245. /* +1 small, +1d4 large */ 246. /* misc */ 247. WEAPON("bullwhip", (char *)0, 248. 1, 0, 0, 2, 20, 4, 2, 1, 0, 0, 0, LEATHER, CLR_BROWN), 249. 250. /* bows */ 251. BOW("bow", (char *)0, 1, 24, 30, 60, 0, WOOD, WP_BOW, HI_WOOD), 252. BOW("elven bow", "runed bow", 0, 12, 30, 60, 0, WOOD, WP_BOW, HI_WOOD), 253. BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, WP_BOW, CLR_BLACK), 254. BOW("yumi", "long bow", 0, 0, 30, 60, 0, WOOD, WP_BOW, HI_WOOD), 255. BOW("sling", (char *)0, 1, 40, 3, 20, 0, WOOD, WP_SLING, HI_WOOD), 256. BOW("crossbow", (char *)0, 1, 45, 50, 40, 0, WOOD, WP_CROSSBOW, HI_WOOD), 257. 258. #undef P 259. #undef S 260. #undef B 261. 262. #undef WEAPON 263. #undef PROJECTILE 264. #undef BOW 265. 266. /* armor ... */ 267. /* IRON denotes ferrous metals, including steel. 268. * Only IRON weapons and armor can rust. 269. * Only COPPER (including brass) corrodes. 270. * Some creatures are vulnerable to SILVER. 271. */ 272. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \ 273. OBJECT( \ 274. OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \ 275. ARMOR_CLASS, prob, delay, wt, cost, \ 276. 0, 0, 10 - ac, can, wt, c ) 277. #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 278. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c) 279. #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 280. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c) 281. #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \ 282. ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c) 283. #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 284. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c) 285. #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 286. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c) 287. 288. /* helmets */ 289. HELM("elven leather helm", "leather hat", 290. 0, 0, 0, 6, 1, 3, 8, 9, 0, LEATHER, HI_LEATHER), 291. HELM("orcish helm", "iron skull cap", 292. 0, 0, 0, 6, 1, 30, 10, 9, 0, IRON, CLR_BLACK), 293. HELM("dwarvish iron helm", "hard hat", 294. 0, 0, 0, 6, 1, 40, 20, 8, 0, IRON, HI_METAL), 295. HELM("fedora", (char *)0, 296. 1, 0, 0, 0, 0, 3, 1,10, 0, CLOTH, CLR_BROWN), 297. HELM("cornuthaum", "conical hat", 298. 0, 1, CLAIRVOYANT, 299. 3, 1, 4, 80,10, 2, CLOTH, CLR_BLUE), 300. HELM("dunce cap", "conical hat", 301. 0, 1, 0, 3, 1, 4, 1,10, 0, CLOTH, CLR_BLUE), 302. HELM("dented pot", (char *)0, 303. 1, 0, 0, 2, 0, 10, 8, 9, 0, IRON, CLR_BLACK), 304. HELM("helmet", "plumed helmet", 305. 0, 0, 0, 10, 1, 30, 10, 9, 0, IRON, HI_METAL), 306. HELM("helm of brilliance", "etched helmet", 307. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, CLR_GREEN), 308. HELM("helm of opposite alignment", "crested helmet", 309. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, HI_METAL), 310. HELM("helm of telepathy", "visored helmet", 311. 0, 1, TELEPAT, 2, 1, 50, 50, 9, 0, IRON, HI_METAL), 312. 313. /* suits of armor */ 314. /* 315. * There is code in polyself.c that assumes (1) and (2). 316. * There is code in objnam.c, mon.c, read.c that assumes (2). 317. * 318. * (1) The dragon scale mails and the dragon scales are together. 319. * (2) That the order of the dragon scale mail and dragon scales is the 320. * the same defined in monst.c. 321. */ 322. #define DRGN_ARMR(name,power,cost,ac,color) \ 323. ARMOR(name,(char *)0,1,0,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color) 324. DRGN_ARMR("gray dragon scale mail", ANTIMAGIC, 1200, 1, CLR_GRAY), 325. DRGN_ARMR("red dragon scale mail", FIRE_RES, 900, 1, CLR_RED), 326. DRGN_ARMR("white dragon scale mail", COLD_RES, 900, 1, CLR_WHITE), 327. DRGN_ARMR("orange dragon scale mail", SLEEP_RES, 900, 1, CLR_ORANGE), 328. DRGN_ARMR("black dragon scale mail", DISINT_RES, 1200, 1, CLR_BLACK), 329. DRGN_ARMR("blue dragon scale mail", SHOCK_RES, 900, 1, CLR_BLUE), 330. DRGN_ARMR("green dragon scale mail", POISON_RES, 900, 1, CLR_GREEN), 331. DRGN_ARMR("yellow dragon scale mail", 0, 900, 1, CLR_YELLOW), 332. 333. /* For now, only dragons leave these. */ 334. DRGN_ARMR("gray dragon scales", ANTIMAGIC, 700, 7, CLR_GRAY), 335. DRGN_ARMR("red dragon scales", FIRE_RES, 500, 7, CLR_RED), 336. DRGN_ARMR("white dragon scales", COLD_RES, 500, 7, CLR_WHITE), 337. DRGN_ARMR("orange dragon scales", SLEEP_RES, 500, 7, CLR_ORANGE), 338. DRGN_ARMR("black dragon scales", DISINT_RES, 700, 7, CLR_BLACK), 339. DRGN_ARMR("blue dragon scales", SHOCK_RES, 500, 7, CLR_BLUE), 340. DRGN_ARMR("green dragon scales", POISON_RES, 500, 7, CLR_GREEN), 341. DRGN_ARMR("yellow dragon scales", 0, 500, 7, CLR_YELLOW), 342. #undef DRGN_ARMR 343. 344. ARMOR("plate mail", (char *)0, 345. 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL), 346. ARMOR("crystal plate mail", (char *)0, 347. 1, 0, 1, 0, 10, 5, 450, 820, 3, 2, ARM_SUIT, GLASS, CLR_WHITE), 348. #ifdef TOURIST 349. ARMOR("bronze plate mail", (char *)0, 350. 1, 0, 1, 0, 25, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER), 351. #else 352. ARMOR("bronze plate mail", (char *)0, 353. 1, 0, 1, 0, 35, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER), 354. #endif 355. ARMOR("splint mail", (char *)0, 356. 1, 0, 1, 0, 65, 5, 400, 80, 4, 1, ARM_SUIT, IRON, HI_METAL), 357. ARMOR("banded mail", (char *)0, 358. 1, 0, 1, 0, 75, 5, 350, 90, 4, 0, ARM_SUIT, IRON, HI_METAL), 359. ARMOR("dwarvish mithril-coat", (char *)0, 360. 1, 0, 0, 0, 10, 1, 150, 240, 4, 3, ARM_SUIT, MITHRIL, HI_METAL), 361. ARMOR("elven mithril-coat", (char *)0, 362. 1, 0, 0, 0, 15, 1, 150, 240, 5, 3, ARM_SUIT, MITHRIL, HI_METAL), 363. ARMOR("chain mail", (char *)0, 364. 1, 0, 0, 0, 75, 5, 300, 75, 5, 1, ARM_SUIT, IRON, HI_METAL), 365. ARMOR("orcish chain mail", "crude chain mail", 366. 0, 0, 0, 0, 20, 5, 300, 75, 6, 1, ARM_SUIT, IRON, CLR_BLACK), 367. ARMOR("scale mail", (char *)0, 368. 1, 0, 0, 0, 75, 5, 250, 45, 6, 0, ARM_SUIT, IRON, HI_METAL), 369. ARMOR("studded leather armor", (char *)0, 370. 1, 0, 0, 0, 75, 3, 200, 15, 7, 1, ARM_SUIT, LEATHER, HI_LEATHER), 371. ARMOR("ring mail", (char *)0, 372. 1, 0, 0, 0, 75, 5, 250, 100, 7, 0, ARM_SUIT, IRON, HI_METAL), 373. ARMOR("orcish ring mail", "crude ring mail", 374. 0, 0, 0, 0, 20, 5, 250, 80, 8, 1, ARM_SUIT, IRON, CLR_BLACK), 375. ARMOR("leather armor", (char *)0, 376. 1, 0, 0, 0, 85, 3, 150, 5, 8, 0, ARM_SUIT, LEATHER, HI_LEATHER), 377. ARMOR("leather jacket", (char *)0, 378. 1, 0, 0, 0, 12, 0, 30, 10, 9, 0, ARM_SUIT, LEATHER, CLR_BLACK), 379. 380. #ifdef TOURIST 381. /* shirts */ 382. ARMOR("Hawaiian shirt", (char *)0, 383. 1, 0, 0, 0, 8, 0, 5, 3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA), 384. ARMOR("T-shirt", (char *)0, 385. 1, 0, 0, 0, 2, 0, 5, 2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE), 386. #endif 387. 388. /* cloaks */ 389. /* 'cope' is not a spelling mistake... leave it be */ 390. CLOAK("mummy wrapping", (char *)0, 391. 1, 0, 0, 0, 0, 3, 2, 10, 1, CLOTH, CLR_GRAY), 392. CLOAK("elven cloak", "faded pall", 393. 0, 1, STEALTH, 10, 0, 10, 60, 9, 3, CLOTH, CLR_BLACK), 394. CLOAK("orcish cloak", "coarse mantelet", 395. 0, 0, 0, 10, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK), 396. CLOAK("dwarvish cloak", "hooded cloak", 397. 0, 0, 0, 10, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH), 398. CLOAK("oilskin cloak", "slippery cloak", 399. 0, 0, 0, 10, 0, 10, 50, 9, 3, CLOTH, HI_CLOTH), 400. CLOAK("cloak of protection", "tattered cape", 401. 0, 1, PROTECTION,10, 0, 10, 50, 7, 3, CLOTH, HI_CLOTH), 402. CLOAK("cloak of invisibility", "opera cloak", 403. 0, 1, INVIS, 11, 0, 10, 60, 9, 2, CLOTH, CLR_BRIGHT_MAGENTA), 404. CLOAK("cloak of magic resistance", "ornamental cope", 405. 0, 1, ANTIMAGIC, 2, 0, 10, 60, 9, 3, CLOTH, CLR_WHITE), 406. CLOAK("cloak of displacement", "piece of cloth", 407. 0, 1, DISPLACED, 11, 0, 10, 50, 9, 2, CLOTH, HI_CLOTH), 408. 409. /* shields */ 410. SHIELD("small shield", (char *)0, 411. 1, 0, 0, 0, 6, 0, 30, 3, 9, 0, WOOD, HI_WOOD), 412. SHIELD("elven shield", "blue and green shield", 413. 0, 0, 0, 0, 2, 0, 50, 7, 8, 0, IRON, CLR_GREEN), 414. SHIELD("Uruk-hai shield", "white-handed shield", 415. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, HI_METAL), 416. SHIELD("orcish shield", "red-eyed shield", 417. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, CLR_RED), 418. SHIELD("large shield", (char *)0, 419. 1, 0, 1, 0, 7, 0,100, 10, 8, 0, IRON, HI_METAL), 420. SHIELD("dwarvish roundshield", "large round shield", 421. 0, 0, 0, 0, 4, 0,100, 10, 8, 0, IRON, HI_METAL), 422. SHIELD("shield of reflection", "polished silver shield", 423. 0, 1, 0, REFLECTING, 3, 0, 50, 50, 8, 0, SILVER, HI_SILVER), 424. 425. /* gloves */ 426. /* these have their color but not material shuffled, so the IRON must stay 427. * CLR_BROWN ( HI_LEATHER) 428. */ 429. GLOVES("leather gloves", "old gloves", 430. 0, 0, 0, 16, 1, 10, 8, 9, 0, LEATHER, HI_LEATHER), 431. GLOVES("gauntlets of fumbling", "padded gloves", 432. 0, 1, FUMBLING, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER), 433. GLOVES("gauntlets of power", "riding gloves", 434. 0, 1, 0, 8, 1, 30, 50, 9, 0, IRON, CLR_BROWN), 435. GLOVES("gauntlets of dexterity", "fencing gloves", 436. 0, 1, 0, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER), 437. 438. /* boots */ 439. BOOTS("low boots", "walking shoes", 440. 0, 0, 0, 25, 2, 10, 8, 9, 0, LEATHER, HI_LEATHER), 441. BOOTS("iron shoes", "hard shoes", 442. 0, 0, 0, 7, 2, 50, 16, 8, 0, IRON, HI_METAL), 443. BOOTS("high boots", "jackboots", 444. 0, 0, 0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER), 445. BOOTS("speed boots", "combat boots", 446. 0, 1, FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 447. BOOTS("water walking boots", "jungle boots", 448. 0, 1, WWALKING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 449. BOOTS("jumping boots", "hiking boots", 450. 0, 1, JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 451. BOOTS("elven boots", "mud boots", 452. 0, 1, STEALTH, 12, 2, 15, 8, 9, 0, LEATHER, HI_LEATHER), 453. BOOTS("fumble boots", "riding boots", 454. 0, 1, FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER), 455. BOOTS("levitation boots", "snow boots", 456. 0, 1, LEVITATION,12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER), 457. #undef HELM 458. #undef CLOAK 459. #undef SHIELD 460. #undef GLOVES 461. #undef BOOTS 462. #undef ARMOR 463. 464. /* rings ... */ 465. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \ 466. OBJ(name,stone), \ 467. BITS(0,0,spec,0,mgc,spec,0,0,0,mohs>=8,0,0,metal), \ 468. power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color ) 469. RING("adornment", ADORNED, "wooden", 100, 1, 1, 2, WOOD, HI_WOOD), 470. RING("gain strength", 0, "granite", 150, 1, 1, 7, MINERAL, HI_MINERAL), 471. RING("increase damage", 0, "coral", 150, 1, 1, 4, MINERAL, CLR_ORANGE), 472. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK), 473. RING("regeneration", REGENERATION, "moonstone", 474. 200, 1, 0, 6, MINERAL, HI_MINERAL), 475. RING("searching", SEARCHING, "tiger eye", 200, 1, 0, 6, GEMSTONE, CLR_BROWN), 476. RING("stealth", STEALTH, "jade", 100, 1, 0, 6, GEMSTONE, CLR_GREEN), 477. RING("levitation", LEVITATION, "agate", 200, 1, 0, 7, GEMSTONE, CLR_RED), 478. RING("hunger", HUNGER, "topaz", 100, 1, 0, 8, GEMSTONE, CLR_CYAN), 479. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire", 480. 150, 1, 0, 9, GEMSTONE, CLR_BLUE), 481. RING("conflict", CONFLICT, "ruby", 300, 1, 0, 9, GEMSTONE, CLR_RED), 482. RING("warning", WARNING, "diamond", 100, 1, 0,10, GEMSTONE, CLR_WHITE), 483. RING("poison resistance", POISON_RES, "pearl", 484. 150, 1, 0, 4, IRON, CLR_WHITE), 485. RING("fire resistance", FIRE_RES, "iron", 200, 1, 0, 5, IRON, HI_METAL), 486. RING("cold resistance", COLD_RES, "brass", 150, 1, 0, 4, COPPER, HI_COPPER), 487. RING("shock resistance", SHOCK_RES, "copper", 488. 150, 1, 0, 3, COPPER, HI_COPPER), 489. RING("teleportation", TELEPORT, "silver", 200, 1, 0, 3, SILVER, HI_SILVER), 490. RING("teleport control", TELEPORT_CONTROL, "gold", 491. 300, 1, 0, 3, GOLD, HI_GOLD), 492. RING("polymorph", POLYMORPH, "ivory", 300, 1, 0, 4, BONE, CLR_WHITE), 493. RING("polymorph control", POLYMORPH_CONTROL, "emerald", 494. 300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN), 495. RING("invisibility", INVIS, "wire", 150, 1, 0, 5, IRON, HI_METAL), 496. RING("see invisible", SEE_INVIS, "engagement", 497. 150, 1, 0, 5, IRON, HI_METAL), 498. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny", 499. 100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN), 500. #undef RING 501. 502. /* amulets ... - THE Amulet comes last because it is special */ 503. #define AMULET(name,desc,power,prob) OBJECT( \ 504. OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,0,IRON), power, \ 505. AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL ) 506. 507. AMULET("amulet of ESP", "circular", TELEPAT, 180), 508. AMULET("amulet of life saving", "spherical", LIFESAVED, 80), 509. AMULET("amulet of strangulation", "oval", STRANGLED, 140), 510. AMULET("amulet of restful sleep", "triangular", SLEEPING, 140), 511. AMULET("amulet versus poison", "pyramidal", POISON_RES, 170), 512. AMULET("amulet of change", "square", 0, 140), 513. /* POLYMORPH */ 514. AMULET("amulet of reflection", "hexagonal", REFLECTING, 80), 515. AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 70), 516. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor", 517. "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0, 518. AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL), 519. OBJECT(OBJ("Amulet of Yendor",(char *)0), BITS(1,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0, 520. AMULET_CLASS, 0, 0, 20, 3500, 0, 0, 0, 0, 20, HI_METAL), 521. #undef AMULET 522. 523. /* tools ... */ 524. /* tools with weapon characteristics come last */ 525. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \ 526. OBJECT( OBJ(name,desc), \ 527. BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,0,mat), \ 528. 0, TOOL_CLASS, prob, 0, \ 529. wt, cost, 0, 0, 0, 0, wt, color ) 530. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \ 531. OBJECT( OBJ(name,desc), \ 532. BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,0,mat), \ 533. 0, TOOL_CLASS, prob, 0, \ 534. wt, cost, 0, 0, 0, 0, wt, color ) 535. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \ 536. OBJECT( OBJ(name,desc), \ 537. BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \ 538. 0, TOOL_CLASS, prob, 0, \ 539. wt, cost, sdam, ldam, hitbon, 0, wt, clr ) 540. /* containers */ 541. CONTAINER("large box", (char *)0, 1, 0, 0, 40,350, 8, WOOD, HI_WOOD), 542. CONTAINER("chest", (char *)0, 1, 0, 0, 35,600, 16, WOOD, HI_WOOD), 543. CONTAINER("ice box", (char *)0, 1, 0, 0, 5,900, 42, PLASTIC, CLR_WHITE), 544. CONTAINER("sack", "bag", 0, 0, 0, 35, 15, 2, CLOTH, HI_CLOTH), 545. CONTAINER("oilskin sack", "bag", 0, 0, 0, 5, 15, 100, CLOTH, HI_CLOTH), 546. CONTAINER("bag of holding", "bag", 0, 1, 0, 20, 15, 100, CLOTH, HI_CLOTH), 547. CONTAINER("bag of tricks", "bag", 0, 1, 1, 20, 15, 100, CLOTH, HI_CLOTH), 548. #undef CONTAINER 549. 550. /* lock opening tools */ 551. TOOL("skeleton key", "key", 0, 0, 0, 0, 80, 3, 10, IRON, HI_METAL), 552. #ifdef TOURIST 553. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 60, 4, 20, IRON, HI_METAL), 554. TOOL("credit card", (char *)0, 1, 0, 0, 0, 15, 1, 10, PLASTIC, CLR_WHITE), 555. #else 556. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 75, 4, 20, IRON, HI_METAL), 557. #endif 558. /* light sources */ 559. TOOL("tallow candle", "candle", 0, 1, 0, 0, 20, 2, 10, WAX, CLR_WHITE), 560. TOOL("wax candle", "candle", 0, 1, 0, 0, 5, 2, 20, WAX, CLR_WHITE), 561. TOOL("brass lantern", (char *)0,1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW), 562. TOOL("oil lamp", "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW), 563. TOOL("magic lamp", "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW), 564. /* other tools */ 565. #ifdef TOURIST 566. TOOL("expensive camera", (char *)0, 567. 1, 0, 0, 0, 15, 12, 200, PLASTIC, CLR_BLACK), 568. TOOL("mirror", "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER), 569. #else 570. TOOL("mirror", "looking glass", 0, 0, 0, 0, 60, 13, 10, GLASS, HI_SILVER), 571. #endif 572. TOOL("crystal ball", "glass orb", 573. 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS), 574. TOOL("blindfold", (char *)0, 1, 0, 0, 0, 55, 2, 20, CLOTH, CLR_BLACK), 575. TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA), 576. TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER), 577. TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL), 578. TOOL("tinning kit", (char *)0, 1, 0, 0, 0, 15,100, 30, IRON, HI_METAL), 579. TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL), 580. TOOL("can of grease", (char *)0,1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL), 581. TOOL("figurine", (char *)0, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL), 582. TOOL("magic marker", (char *)0, 1, 0, 1, 1, 15, 2, 50, PLASTIC, CLR_RED), 583. /* traps */ 584. TOOL("land mine",(char *)0, 1, 0, 0, 0, 0,300, 180, IRON, CLR_RED), 585. TOOL("beartrap", (char *)0, 1, 0, 0, 0, 0,200, 60, IRON, HI_METAL), 586. /* instruments */ 587. TOOL("tin whistle", "whistle", 0, 0, 0, 0, 105, 3, 10, METAL, HI_METAL), 588. TOOL("magic whistle", "whistle",0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL), 589. /* "If tin whistles are made out of tin, what do they make foghorns out of?" */ 590. TOOL("wooden flute", "flute", 0, 0, 0, 0, 4, 5, 12, WOOD, HI_WOOD), 591. TOOL("magic flute", "flute", 0, 0, 1, 1, 2, 5, 36, WOOD, HI_WOOD), 592. TOOL("tooled horn", "horn", 0, 0, 0, 0, 5, 18, 15, BONE, CLR_WHITE), 593. TOOL("frost horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 594. TOOL("fire horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 595. TOOL("horn of plenty", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 596. TOOL("wooden harp", "harp", 0, 0, 1, 0, 4, 30, 50, WOOD, HI_WOOD), 597. TOOL("magic harp", "harp", 0, 0, 1, 1, 2, 30, 50, WOOD, HI_WOOD), 598. TOOL("bell", (char *)0, 1, 0, 0, 0, 2, 30, 50, COPPER, HI_COPPER), 599. TOOL("bugle", (char *)0, 1, 0, 0, 0, 4, 10, 15, COPPER, HI_COPPER), 600. TOOL("leather drum", "drum", 0, 0, 0, 0, 4, 25, 25, LEATHER, HI_LEATHER), 601. TOOL("drum of earthquake", "drum", 602. 0, 0, 1, 1, 2, 25, 25, LEATHER, HI_LEATHER), 603. /* tools useful as weapons */ 604. WEPTOOL("pick-axe", (char *)0, 605. 1, 0, 0, 20, 100, 50, 6, 3, WHACK, WEP_BLADE, IRON, HI_METAL), 606. WEPTOOL("unicorn horn", (char *)0, 607. 1, 1, 1, 0, 20, 100, 12, 12, PIERCE, WEP_SPEAR, BONE, CLR_WHITE), 608. 609. /* two special unique artifact "tools" */ 610. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"), 611. BITS(0,0,1,0,1,0,1,1,0,0,0,0,GOLD), 0, 612. TOOL_CLASS, 0, 0,10, 3000, 0, 0, 0, 0, 200, HI_GOLD), 613. OBJECT(OBJ("Bell of Opening", "silver bell"), 614. BITS(0,0,1,0,1,1,1,1,0,0,0,0,SILVER), 0, 615. TOOL_CLASS, 0, 0,10, 1000, 0, 0, 0, 0, 50, HI_SILVER), 616. #undef TOOL 617. #undef WEPTOOL 618. 619. /* comestibles ... */ 620. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \ 621. OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,0,tin), 0, \ 622. FOOD_CLASS, prob, delay, \ 623. wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color ) 624. /* all types of food (except tins & corpses) must have a delay of at least 1. */ 625. /* delay on corpses is computed and is weight dependant */ 626. /* dog eats foods 0-4 but prefers tripe rations above all others */ 627. /* fortune cookies can be read */ 628. /* carrots improve your vision */ 629. /* +0 tins contain monster meat */ 630. /* +1 tins (of spinach) make you stronger (like Popeye) */ 631. /* food CORPSE is a cadaver of some type */ 632. 633. /* meat */ 634. FOOD("tripe ration", 142, 2, 10, 0, FLESH, 200, CLR_BROWN), 635. FOOD("corpse", 0, 1, 0, 0, FLESH, 0, CLR_BROWN), 636. FOOD("egg", 85, 1, 1, 1, FLESH, 80, CLR_WHITE), 637. 638. /* fruits & veggies */ 639. FOOD("apple", 15, 1, 2, 0, VEGGY, 50, CLR_RED), 640. FOOD("orange", 10, 1, 2, 0, VEGGY, 80, CLR_ORANGE), 641. FOOD("pear", 10, 1, 2, 0, VEGGY, 50, CLR_BRIGHT_GREEN), 642. FOOD("melon", 10, 1, 5, 0, VEGGY, 100, CLR_BRIGHT_GREEN), 643. FOOD("banana", 10, 1, 2, 0, VEGGY, 80, CLR_YELLOW), 644. FOOD("carrot", 15, 1, 2, 0, VEGGY, 50, CLR_ORANGE), 645. FOOD("sprig of wolfsbane", 7, 1, 1, 0, VEGGY, 40, CLR_GREEN), 646. FOOD("clove of garlic", 7, 1, 1, 0, VEGGY, 40, CLR_WHITE), 647. FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC), 648. 649. /* people food */ 650. FOOD("lump of royal jelly", 0, 1, 2, 0, VEGGY, 200, CLR_YELLOW), 651. FOOD("cream pie", 25, 1, 10, 0, VEGGY, 100, CLR_WHITE), 652. FOOD("candy bar", 13, 1, 2, 0, VEGGY, 100, CLR_BROWN), 653. FOOD("fortune cookie", 55, 1, 1, 0, VEGGY, 40, CLR_YELLOW), 654. FOOD("pancake", 25, 2, 2, 0, VEGGY, 200, CLR_YELLOW), 655. FOOD("lembas wafer", 20, 2, 5, 0, VEGGY, 800, CLR_WHITE), 656. FOOD("cram ration", 20, 3, 15, 0, VEGGY, 600, HI_ORGANIC), 657. FOOD("food ration", 381, 5, 20, 0, VEGGY, 800, HI_ORGANIC), 658. FOOD("K-ration", 0, 1, 10, 0, VEGGY, 400, HI_ORGANIC), 659. FOOD("C-ration", 0, 1, 10, 0, VEGGY, 300, HI_ORGANIC), 660. FOOD("tin", 75, 0, 10, 1, METAL, 0, HI_METAL), 661. #undef FOOD 662. 663. /* potions ... */ 664. #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \ 665. OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,0,GLASS), power, \ 666. POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color ) 667. POTION("gain ability", "ruby", 1, 0, 45, 300, CLR_RED), 668. POTION("restore ability", "pink", 1, 0, 45, 100, CLR_BRIGHT_MAGENTA), 669. POTION("confusion", "orange", 1, CONFUSION, 45, 100, CLR_ORANGE), 670. POTION("blindness", "yellow", 1, BLINDED, 45, 150, CLR_YELLOW), 671. POTION("paralysis", "emerald", 1, 0, 45, 300, CLR_BRIGHT_GREEN), 672. POTION("speed", "dark green", 1, FAST, 45, 200, CLR_GREEN), 673. POTION("levitation", "cyan", 1, LEVITATION, 45, 200, CLR_CYAN), 674. POTION("hallucination", "sky blue", 1, HALLUC, 45, 100, CLR_CYAN), 675. POTION("invisibility", "brilliant blue",1, INVIS, 45, 150, CLR_BRIGHT_BLUE), 676. POTION("see invisible", "magenta", 1, SEE_INVIS, 45, 50, CLR_MAGENTA), 677. POTION("healing", "purple-red", 1, 0, 65, 100, CLR_MAGENTA), 678. POTION("extra healing", "puce", 1, 0, 50, 100, CLR_RED), 679. POTION("gain level", "milky", 1, 0, 20, 300, CLR_WHITE), 680. POTION("enlightenment", "swirly", 1, 0, 20, 200, CLR_BROWN), 681. POTION("monster detection", "bubbly", 1, 0, 45, 150, CLR_WHITE), 682. POTION("object detection", "smoky", 1, 0, 45, 150, CLR_GRAY), 683. POTION("gain energy", "cloudy", 1, 0, 45, 150, CLR_WHITE), 684. POTION("booze", "brown", 0, 0, 45, 50, CLR_BROWN), 685. POTION("sickness", "fizzy", 0, 0, 45, 50, CLR_CYAN), 686. POTION("fruit juice", "dark", 0, 0, 45, 50, CLR_BLACK), 687. POTION("oil", "murky", 0, 0, 30, 250, CLR_BROWN), 688. POTION("water", "clear", 0, 0, 95, 100, CLR_CYAN), 689. #undef POTION 690. 691. /* scrolls ... */ 692. #define SCROLL(name,text,mgc,prob,cost) OBJECT( \ 693. OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,0,PAPER), 0, \ 694. SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER ) 695. SCROLL("enchant armor", "ZELGO MER", 1, 63, 80), 696. SCROLL("destroy armor", "JUYED AWK YACC", 1, 45, 100), 697. SCROLL("confuse monster", "NR 9", 1, 53, 100), 698. SCROLL("scare monster", "XIXAXA XOXAXA XUXAXA", 1, 35, 100), 699. SCROLL("remove curse", "PRATYAVAYAH", 1, 65, 80), 700. SCROLL("enchant weapon", "DAIYEN FOOELS", 1, 85, 60), 701. SCROLL("create monster", "LEP GEX VEN ZEA", 1, 45, 200), 702. SCROLL("taming", "PRIRUTSENIE", 1, 15, 200), 703. SCROLL("genocide", "ELBIB YLOH", 1, 15, 300), 704. SCROLL("light", "VERR YED HORRE", 1, 95, 50), 705. SCROLL("teleportation", "VENZAR BORGAVVE", 1, 55, 100), 706. SCROLL("gold detection", "THARR", 1, 33, 100), 707. SCROLL("food detection", "YUM YUM", 1, 25, 100), 708. SCROLL("identify", "KERNOD WEL", 1, 185, 20), 709. SCROLL("magic mapping", "ELAM EBOW", 1, 45, 100), 710. SCROLL("amnesia", "DUAM XNAHT", 1, 35, 200), 711. SCROLL("fire", "ANDOVA BEGARIN", 1, 48, 100), 712. SCROLL("punishment", "VE FORBRYDERNE", 1, 15, 300), 713. SCROLL("charging", "HACKEM MUCHE", 1, 15, 300), 714. SCROLL((char *)0, "VELOX NEB", 1, 0, 100), 715. SCROLL((char *)0, "FOOBIE BLETCH", 1, 0, 100), 716. SCROLL((char *)0, "TEMOV", 1, 0, 100), 717. SCROLL((char *)0, "GARVEN DEH", 1, 0, 100), 718. SCROLL((char *)0, "READ ME", 1, 0, 100), 719. SCROLL((char *)0, "KIRJE", 1, 0, 100), 720. /* these must come last because they have special descriptions */ 721. #ifdef MAIL 722. SCROLL("mail", "stamped", 0, 0, 0), 723. #endif 724. SCROLL("blank paper", "unlabeled", 0, 28, 60), 725. #undef SCROLL 726. 727. /* spell books ... */ 728. #define SPELL(name,desc,prob,delay,level,mgc,dir,color) OBJECT( \ 729. OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,0,PAPER), 0, \ 730. SPBOOK_CLASS, prob, delay, \ 731. 50, level*100, 0, 0, 0, level, 20, color ) 732. SPELL("dig", "parchment", 22, 6, 5, 1, RAY, HI_PAPER), 733. SPELL("magic missile", "vellum", 45, 3, 2, 1, RAY, HI_PAPER), 734. SPELL("fireball", "ragged", 20, 6, 4, 1, RAY, HI_PAPER), 735. SPELL("cone of cold", "dog eared", 10, 8, 5, 1, RAY, HI_PAPER), 736. SPELL("sleep", "mottled", 50, 1, 1, 1, RAY, HI_PAPER), 737. SPELL("finger of death", "stained", 5, 10, 7, 1, RAY, HI_PAPER), 738. SPELL("light", "cloth", 45, 1, 1, 1, NODIR, HI_CLOTH), 739. SPELL("detect monsters", "leather", 45, 1, 1, 1, NODIR, HI_LEATHER), 740. SPELL("healing", "white", 40, 2, 1, 1, IMMEDIATE, CLR_WHITE), 741. SPELL("knock", "pink", 36, 1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA), 742. SPELL("force bolt", "red", 35, 2, 1, 1, IMMEDIATE, CLR_RED), 743. SPELL("confuse monster", "orange", 37, 2, 2, 1, IMMEDIATE, CLR_ORANGE), 744. SPELL("cure blindness", "yellow", 27, 2, 2, 1, IMMEDIATE, CLR_YELLOW), 745. SPELL("slow monster", "light green", 37, 2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN), 746. SPELL("wizard lock", "dark green", 35, 3, 2, 1, IMMEDIATE, CLR_GREEN), 747. SPELL("create monster", "turquoise", 37, 3, 2, 1, NODIR, CLR_BRIGHT_CYAN), 748. SPELL("detect food", "cyan", 37, 3, 2, 1, NODIR, CLR_CYAN), 749. SPELL("cause fear", "light blue", 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE), 750. SPELL("clairvoyance", "dark blue", 15, 3, 3, 1, NODIR, CLR_BLUE), 751. SPELL("cure sickness", "indigo", 32, 3, 3, 1, NODIR, CLR_BLUE), 752. SPELL("charm monster", "magenta", 20, 3, 3, 1, IMMEDIATE, CLR_MAGENTA), 753. SPELL("haste self", "purple", 33, 4, 3, 1, NODIR, CLR_MAGENTA), 754. SPELL("detect unseen", "violet", 20, 4, 3, 1, NODIR, CLR_MAGENTA), 755. SPELL("levitation", "tan", 20, 4, 4, 1, NODIR, CLR_BROWN), 756. SPELL("extra healing", "plaid", 35, 5, 3, 1, IMMEDIATE, CLR_GREEN), 757. SPELL("restore ability", "light brown", 25, 5, 4, 1, NODIR, CLR_BROWN), 758. SPELL("invisibility", "dark brown", 32, 5, 4, 1, NODIR, CLR_BROWN), 759. SPELL("detect treasure", "gray", 25, 5, 4, 1, NODIR, CLR_GRAY), 760. SPELL("remove curse", "wrinkled", 25, 5, 5, 1, NODIR, HI_PAPER), 761. SPELL("magic mapping", "dusty", 18, 7, 5, 1, NODIR, HI_PAPER), 762. SPELL("identify", "bronze", 25, 8, 5, 1, NODIR, HI_COPPER), 763. SPELL("turn undead", "copper", 17, 8, 6, 1, IMMEDIATE, HI_COPPER), 764. SPELL("polymorph", "silver", 10, 8, 6, 1, IMMEDIATE, HI_SILVER), 765. SPELL("teleport away", "gold", 15, 6, 6, 1, IMMEDIATE, HI_GOLD), 766. SPELL("create familiar", "glittering", 10, 7, 6, 1, NODIR, CLR_WHITE), 767. SPELL("cancellation", "shining", 15, 8, 7, 1, IMMEDIATE, CLR_WHITE), 768. SPELL((char *)0, "dull", 0, 0, 0, 1, 0, HI_PAPER), 769. SPELL((char *)0, "thin", 0, 0, 0, 1, 0, HI_PAPER), 770. SPELL((char *)0, "thick", 0, 0, 0, 1, 0, HI_PAPER), 771. /* blank spellbook must come last because it retains its description */ 772. SPELL("blank paper", "plain", 20, 0, 0, 0, 0, HI_PAPER), 773. /* a special, one of a kind, spellbook */ 774. OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,PAPER), 0, 775. SPBOOK_CLASS, 0, 0,20, 3500, 0, 0, 0, 7, 20, HI_PAPER), 776. #undef SPELL 777. 778. /* wands ... */ 779. #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \ 780. OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,0,metal), 0, \ 781. WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color ) 782. WAND("light", "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS), 783. WAND("secret door detection", "balsa", 784. 50, 150, 1, NODIR, WOOD, HI_WOOD), 785. WAND("create monster", "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD), 786. WAND("wishing", "pine", 5, 500, 1, NODIR, WOOD, HI_WOOD), 787. WAND("nothing", "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD), 788. WAND("striking", "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD), 789. WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL), 790. WAND("slow monster", "tin", 55, 150, 1, IMMEDIATE, METAL, HI_METAL), 791. WAND("speed monster", "brass", 55, 150, 1, IMMEDIATE, COPPER, HI_COPPER), 792. WAND("undead turning", "copper", 55, 150, 1, IMMEDIATE, COPPER, HI_COPPER), 793. WAND("polymorph", "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER), 794. WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE), 795. WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL, CLR_BRIGHT_CYAN), 796. WAND("opening", "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL), 797. WAND("locking", "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL), 798. WAND("probing", "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL), 799. WAND("digging", "iron", 55, 150, 1, RAY, IRON, HI_METAL), 800. WAND("magic missile", "steel", 50, 150, 1, RAY, IRON, HI_METAL), 801. WAND("fire", "hexagonal",40, 175, 1, RAY, IRON, HI_METAL), 802. WAND("cold", "short", 40, 175, 1, RAY, IRON, HI_METAL), 803. WAND("sleep", "runed", 50, 175, 1, RAY, IRON, HI_METAL), 804. WAND("death", "long", 5, 500, 1, RAY, IRON, HI_METAL), 805. WAND("lightning", "curved", 40, 175, 1, RAY, IRON, HI_METAL), 806. WAND((char *)0, "forked", 0, 150, 1, 0, WOOD, HI_WOOD), 807. WAND((char *)0, "spiked", 0, 150, 1, 0, IRON, HI_METAL), 808. WAND((char *)0, "jeweled", 0, 150, 1, 0, IRON, HI_MINERAL), 809. #undef WAND 810. 811. /* coins ... - so far, gold is all there is */ 812. #define COIN(name,prob,metal) OBJECT( \ 813. OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,0,metal), 0, \ 814. GOLD_CLASS, prob, 0, 1, 0, 0, 0, 0, 0, 0, HI_GOLD ) 815. COIN("gold piece", 1000, GOLD), 816. #undef COIN 817. 818. /* gems ... - includes stones and rocks but not boulders */ 819. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \ 820. OBJ(name,desc), \ 821. BITS(0,1,0,0,0,0,0,0,0,mohs>=8,0,WEP_AMMO,glass), 0, \ 822. GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, WP_SLING, nutr, color ) 823. #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \ 824. OBJ(name,desc), \ 825. BITS(kn,1,0,0,mgc,0,0,0,0,mohs>=8,0,WEP_AMMO,glass), 0, \ 826. GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, WP_SLING, nutr, color ) 827. GEM("dilithium crystal", "white", 3, 1, 4500, 15, 5, GEMSTONE, CLR_WHITE), 828. GEM("diamond", "white", 4, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE), 829. GEM("ruby", "red", 5, 1, 3500, 15, 9, GEMSTONE, CLR_RED), 830. GEM("sapphire", "blue", 6, 1, 3000, 15, 9, GEMSTONE, CLR_BLUE), 831. GEM("emerald", "green", 7, 1, 2500, 15, 8, GEMSTONE, CLR_GREEN), 832. GEM("turquoise", "green", 8, 1, 2000, 15, 6, GEMSTONE, CLR_GREEN), 833. GEM("aquamarine", "green", 10, 1, 1500, 15, 8, GEMSTONE, CLR_GREEN), 834. GEM("amber", "yellowish brown", 11, 1, 1000, 15, 2, GEMSTONE, CLR_BROWN), 835. GEM("topaz", "yellowish brown", 13, 1, 900, 15, 8, GEMSTONE, CLR_BROWN), 836. GEM("opal", "white", 15, 1, 800, 15, 6, GEMSTONE, CLR_WHITE), 837. GEM("garnet", "red", 17, 1, 700, 15, 7, GEMSTONE, CLR_RED), 838. GEM("amethyst", "violet", 19, 1, 600, 15, 7, GEMSTONE, CLR_MAGENTA), 839. GEM("jasper", "red", 21, 1, 500, 15, 7, GEMSTONE, CLR_RED), 840. GEM("fluorite", "violet", 22, 1, 400, 15, 4, GEMSTONE, CLR_MAGENTA), 841. GEM("jade", "green", 23, 1, 300, 15, 6, GEMSTONE, CLR_GREEN), 842. GEM("worthless piece of white glass", "white", 113, 1, 0, 6, 5, GLASS, CLR_WHITE), 843. GEM("worthless piece of blue glass", "blue", 113, 1, 0, 6, 5, GLASS, CLR_BLUE), 844. GEM("worthless piece of red glass", "red", 113, 1, 0, 6, 5, GLASS, CLR_RED), 845. GEM("worthless piece of yellowish brown glass", "yellowish brown", 846. 113, 1, 0, 6, 5, GLASS, CLR_BROWN), 847. GEM("worthless piece of green glass", "green", 113, 1, 0, 6, 5, GLASS, CLR_GREEN), 848. GEM("worthless piece of violet glass", "violet",113, 1, 0, 6, 5, GLASS, CLR_MAGENTA), 849. 850. ROCK("luckstone", "gray", 0, 10, 10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY), 851. ROCK("loadstone", "gray", 0, 10, 500, 1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY), 852. ROCK("flint", "gray", 0, 18, 10, 1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY), 853. ROCK("rock", (char *)0, 1,100, 10, 0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY), 854. #undef GEM 855. #undef ROCK 856. 857. /* miscellaneous ... */ 858. /* Note: boulders and rocks are not normally created at random; the 859. * probabilities only come into effect when you try to polymorph them. 860. * Boulders and statues weigh more than MAX_CARR_CAP. 861. */ 862. OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,0,MINERAL), 0, 863. ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL), 864. OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,0,MINERAL), 0, 865. ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE), 866. 867. OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,0,IRON), 0, 868. BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL), 869. OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,0,IRON), 0, 870. CHAIN_CLASS, 1000, 0, 120, 0, 0, 0, 0, 0, 200, HI_METAL), 871. 872. OBJECT(OBJ("blinding venom", "splash of venom"), 873. BITS(0,1,0,0,0,0,0,1,0,0,0,0,LIQUID), 0, 874. VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC), 875. OBJECT(OBJ("acid venom", "splash of venom"), 876. BITS(0,1,0,0,0,0,0,1,0,0,0,0,LIQUID), 0, 877. VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC), 878. /* +d6 small or large */ 879. 880. /* fencepost, the deadly Array Terminator -- name arg *must* be NULL */ 881. OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,0,0), 0, 882. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 883. }; /* objects[] */ 884. 885. #ifndef OBJECTS_PASS_2_ 886. 887. /* perform recursive compilation for second structure */ 888. # undef OBJ 889. # undef OBJECT 890. # define OBJECTS_PASS_2_ 891. #include "objects.c" 892. 893. void NDECL(objects_init); 894. 895. /* dummy routine used to force linkage */ 896. void 897. objects_init() 898. { 899. return; 900. } 901. 902. #endif /* !OBJECTS_PASS_2_ */ 903. 904. /*objects.c*/ objects.c